package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.domain.User;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface UserMapper extends BaseMapper<User> {
    @Select("select name,count(*) as count from user group by name having count > 1")
    List<Map<String,String>> count();
    //可以单独定义方法和sql
//    @Override
//    int updateById(Object entity);
//
//    @Override
//    int insert(Object entity);
}
